﻿
using UnityEngine;
namespace Gdmec.Cache
{
    public class CacheManager : AssetCache
    {
        public static CacheManager Instance { get; private set; }
        private void Awake()
        {
            Instance = this;
        }
        private void OnDestroy()
        {
            Instance = null;
        }
        public static Object GetObject(string path)
        {
            return Instance.Get<Object>(path);
        }

        public static GameObject GetGO(string path)
        {
            return Instance.Get<GameObject>(path);
        }

        public static GameObject CloneGO(string path)
        {
            return Instance.Clone<GameObject>(path);
        }

        public static AudioClip GetAudioClip(string path)
        {
            return Instance.Get<AudioClip>(path);
        }
    }
}
